<template>
	<section>
		<el-form :inline="true" :model="formInline" class="demo-form-inline">
		  <el-form-item label="申请事项">
		    <el-input v-model="formInline.applyThing" placeholder="申请事项"></el-input>
		  </el-form-item>
		  <el-form-item label="申请人员">
		    <el-input v-model="formInline.applyPerson" placeholder="申请人员"></el-input>
		  </el-form-item>
	 <el-date-picker
      v-model="formInline.applyTime"
      type="datetimerange"
      range-separator="至"
      start-placeholder="开始日期"
      end-placeholder="结束日期"
      format="yyyy-MM-dd"
     value-format="yyyy-MM-dd"
      >
    </el-date-picker>
		  <el-form-item :label="componentType=='waitdan'?'当前状态':'当前状态'">
		    <el-select v-model="formInline.waitType"  >
		      <el-option :label="item.name" :value="item.val" v-for="item in waitType"></el-option>
		    </el-select>
		  </el-form-item>
		  <el-form-item>
		    <el-button type="primary" @click="onSubmit">查询</el-button>
		     <el-button type="primary" @click="onRefresh">刷新</el-button>
		  </el-form-item>
		</el-form>
	</section>
</template>

<script>
	export default{
		props:{
			waitType:'',
			componentType:'',
		},
		data(){
			return {
					formInline: {/*表单的name*/
			          applyThing: '',
			          applyPerson: '',
			          applyTime:'',
			          waitType:'',
			        }
			}
		},
		methods:{
			onSubmit(){/*提交*/
				console.log(this.formInline);
				this.$emit('onSubmit',this.formInline);
			},
			onRefresh(){/*刷新*/
				location.reload();
			}
		}
	}
</script>

<style scoped="">
	.el-date-editor .el-range-separator{
		    width: 7% !important;	
		    padding: 0;
	}
</style>